<template>
  <div class="footer-box">
    <router-link
      v-for="(item, index) in footerList"
      :key="index"
      :to="item.path"
      class="footer-item"
    >
      <van-icon :name="item.meta.icon" size="24px" />
      <p class="title">{{ item.meta.title }}</p>
    </router-link>
  </div>
</template>

<script>
import homePage from "../router/homePage";
export default {
  data() {
    return {
      footerList: homePage,
    };
  },
  methods: {},
  created() {},
};
</script>

<style lang="scss" scoped>
.footer-box {
  width: 100%;
  height: 50px;
  border-top: 1px solid #cccc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.footer-item {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  p {
    font-size: 14px;
  }
}

.router-link-active {
  color: red;
}
</style>
